<?php
/**
 * Created by PhpStorm.
 * User: hepenghui
 * Date: 2018/9/10
 * Time: 上午10:49
 */

namespace common\models;

use Yii;
use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;
use yii\db\Expression;

class MatchArrangeSend extends ActiveRecord
{
    const READY = 0,COMPLATE = 1,DIRTY = -1;

    public static function tableName()
    {
        return '{{%match_arrange_send}}';
    }

    public function behaviors()
    {
        return [
            [
                'class' => TimestampBehavior::className(),
                'attributes' => [
                    ActiveRecord::EVENT_BEFORE_INSERT => ["atime","utime"],
                    ActiveRecord::EVENT_BEFORE_UPDATE => ["utime"]
                ],
                "value" => new Expression('NOW()')
            ]
        ];
    }
}